package
{
	import flare.animate.Transitioner;
	import flash.geom.Rectangle;
	import flare.vis.data.DataSprite;
	import flare.vis.operator.layout.RandomLayout;

	public class GnivzLayout extends RandomLayout
	{
		public function GnivzLayout()
		{
			super();
		}
		
		/** @inheritDoc */
		public override function operate(t:Transitioner=null):void
		{
			if (t==null) t = Transitioner.DEFAULT;
			var r:Rectangle = layoutBounds;
			visualization.data.nodes.visit(function(d:DataSprite):void {
				if(d.x == 0)
				{
					t.$(d).x = r.x + r.width * Math.random();
					t.$(d).y = r.y + r.height * Math.random();
				}
			});
		}
	}
}